home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
PCW_C.ARJ
/
LTEST.C
< prev
next >
Wrap
Text File
|
1990-01-30
|
2KB
|
62 lines
#include <stdio.h>
#include <pcwproto.h>
#include <menu.h>
static LMNUFLDS menu1[] = {
{ 'A', 2, "Add", "Add an Entry to Database"},
{ 'C', 17,"Change", "Change a Database Entry"},
{ 'D', 33,"Delete", "Delete a Database Entry"},
{ NULL, NULL, NULL, NULL}
};
static LMNUFLDS menu2[] = {
{ 'P', 2, "Purge", "Purge the Workfile"},
{ 'S', 18,"Send", "Send Electronic Mail"},
{ 'E', 35,"Exit", "Exit the Program"},
{ NULL,NULL,NULL,NULL }
};
static LMNUFLDS *menulist[] = {menu1, menu2, NULL};
static LMNUTYPE lmenu = {
NULL,
10, 20, 13, 60,
BLUE, LIGHTGRAY,
DOUBLEALL,RED,LIGHTGRAY,
" The Lotus ",
TOP,MIDDLE,BLACK,LIGHTGRAY,
WHITE,BLUE,
0,0,menulist
};
static char *selections[] = {
"Add ", "Change ",
"Delete ", "Purge ",
"Send "
};
void main(void) {
int i = 0;
int index = 0;
WNDPTR *menuwnd;
init_mouse();
menuwnd = makelmenu(&lmenu);
while (i != 'E' && i != 27) {
i = lmenuinput(&lmenu);
switch(i) {
case 'A' : index = 0; break;
case 'C' : index = 1; break;
case 'D' : index = 2; break;
case 'P' : index = 3; break;
case 'S' : index = 4; break;
case 27 :
case 'E' : continue;
}
qputs(25,CENTER,WHITE,BLACK,selections[index]);
}
if (mpresent) hide_mouse();
menuwnd = wpop(menuwnd);
}